package com.study.design.pattern.pattern.structural.decorator;

/**
 * @Author: gongsl
 * @Date: 2025-03-09 15:53
 * @description: 抽象装饰类
 */
public class AbstractDecorator extends AbsBatterCake {

    private AbsBatterCake absBatterCake;

    public AbstractDecorator(AbsBatterCake absBatterCake) {
        this.absBatterCake = absBatterCake;
    }

    @Override
    protected String getDesc() {
        return this.absBatterCake.getDesc();
    }

    @Override
    protected int cost() {
        return this.absBatterCake.cost();
    }
}
